﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:sys="clr-namespace:System;assembly=System" 
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
	xmlns:System="clr-namespace:System;assembly=mscorlib" 
	xmlns:ssentities="clr-namespace:SIPSorcery.Entities;assembly=SIPSorcery.Entities.Client" 
	xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
	mc:Ignorable="d"
	x:Class="SIPSorcery.CreateAccountControl" Width="587">
	
	<UserControl.Resources>
		<ssentities:SecurityQuestions x:Key="SecurityQuestions" />
		<ssentities:CountriesList x:Key="CountriesList" />
	</UserControl.Resources>

	<StackPanel x:Name="LayoutRoot" Margin="0,0,0,-84">
		<Canvas Height="40" Margin="8,0">
			<TextBlock Width="Auto" FontSize="26.667" Foreground="{StaticResource InfoTextBrush}" Text="Create New Account" TextWrapping="Wrap" Canvas.Left="148" Canvas.Top="1"/>
			<Button x:Name="m_cancelButton" Content="X" Height="31" Width="33" FontSize="16" Click="CloseButton_Click" Canvas.Left="534" Canvas.Top="5"/>
		</Canvas>
		<TextBlock Text="" TextWrapping="Wrap" Margin="0,8,0,8" x:Name="m_statusTextBlock" Foreground="{StaticResource WarningTextBrush}" TextAlignment="Left" HorizontalAlignment="Center" FontSize="16"/>
		<toolkit:DataForm x:Name="m_newCustomerDataForm" Margin="4,36,4,8" CommandButtonsVisibility="Commit,Cancel" AutoGenerateFields="False" 
							AutoEdit="True" AutoCommit="False" EditEnded="EditEnded" Background="Black" BorderBrush="{x:Null}">
			<toolkit:DataForm.EditTemplate>
				<DataTemplate>
					<StackPanel>
						<toolkit:DataField Label="First Name" Foreground="{StaticResource NormalTextBrush}">
							<TextBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding Firstname, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<toolkit:DataField Label="Last Name" Foreground="{StaticResource NormalTextBrush}">
							<TextBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding Lastname, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<toolkit:DataField Label="Email Address" Foreground="{StaticResource NormalTextBrush}">
							<TextBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding EmailAddress, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<toolkit:DataField Label="Username" Foreground="{StaticResource NormalTextBrush}">
							<TextBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding Name, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<toolkit:DataField Label="Password" Foreground="{StaticResource NormalTextBrush}">
							<PasswordBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Password="{Binding CustomerPassword, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<toolkit:DataField Label="Retyped Password" Foreground="{StaticResource NormalTextBrush}">
							<PasswordBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Password="{Binding RetypedPassword, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<toolkit:DataField Label="Security Question" Foreground="{StaticResource NormalTextBrush}">
							<ComboBox Height="23" Foreground="Black" HorizontalAlignment="Left" Margin="0,0,0,0" ItemsSource="{StaticResource SecurityQuestions}" SelectedValue="{Binding SecurityQuestion, Mode=TwoWay}" VerticalAlignment="Top" Width="260" />
						</toolkit:DataField>
						<toolkit:DataField Label="Security Answer" Foreground="{StaticResource NormalTextBrush}">
							<TextBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding SecurityAnswer, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<toolkit:DataField Label="City" Foreground="{StaticResource NormalTextBrush}">
							<TextBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding City, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<toolkit:DataField Label="Country" Foreground="{StaticResource NormalTextBrush}">
							<ComboBox Height="23" Foreground="Black" HorizontalAlignment="Left" Margin="0,0,0,0" ItemsSource="{StaticResource CountriesList}" SelectedValue="{Binding Country, Mode=TwoWay}" VerticalAlignment="Top" Width="180"/>
						</toolkit:DataField>
						<toolkit:DataField Label="Web Site" Foreground="{StaticResource NormalTextBrush}">
							<TextBox Height="23" HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding Web Site, Mode=TwoWay}" VerticalAlignment="Top" Width="280" />
						</toolkit:DataField>
						<!--<toolkit:DataField Label="Time Zone" Foreground="{StaticResource NormalTextBrush}">
							<ComboBox Height="23" x:Name="m_timezonesList" Foreground="Black" HorizontalAlignment="Left" Margin="0,0,0,0" SelectedValue="{Binding Timezone, Mode=TwoWay}" VerticalAlignment="Top" Width="300"/>
						</toolkit:DataField>-->
					</StackPanel>
				</DataTemplate>
			</toolkit:DataForm.EditTemplate>
		</toolkit:DataForm>
	</StackPanel>
</UserControl>